@extends('gotop.index')
@section('content')
		<!-- MAIN -->
		<div id="main" role="main" class="cf">

			<!-- posts list -->
			<div id="posts-list" class="cf">
				<article class="cf">
					<div class="feature-image">
						<a ><img src="{{$article['thumb']}}" alt="Thumbnail" /></a>
					</div>
					<div class="entry-title">
						<a class="post-heading">{{$article['title']}}</a>
						<div class="entry-date">{{$article['updated_at']}}</div>
						<a class="comments">{{$article['click']}}</a>
					</div>
					<div class="excerpt entry-content" style="word-break: normal;">{!! $article['content'] !!}</div>
				</article>
				<!-- Comments wrap-->
				<div id="comments-wrap">
					<h4 class="heading">留言内容</h4>
								
					<!-- comments list -->
					<ul class="commentlist">
                        @foreach($comments as $c)
						<li class="comment byuser comment-author-admin bypostauthor even thread-even depth-1 parent" id="comment-1">
							<div id="div-comment-1" class="comment-body">
								<div class="comment-author vcard">
									<img src="/templates/chahua2601/img/apic18117.jpg" class="avatar avatar-60 photo" height="60" width="60" />
									<cite class="fn">{{$c->user->name}}</cite> <span class="says">的留言:</span>
								</div>
				
								<div class="comment-meta commentmetadata"><a href="javascript:halt();">{{$c['created_at']->diffForHumans()}}</a>
				
									<p>{{$c['content']}}</p>

								</div>
								@auth
                                <div class="reply">
									<a class="comment-reply-link" href="javascript:;">回复</a>
								</div>
                                @endauth
							</div>
						</li>
                        @endforeach
					</ul>
					<!-- ENDS comments list -->
				</div>
				<!-- ENDS Comments wrap -->

				<!-- Respond -->
                @auth
				<div id="respond">
					<h4 class="heading">留言板<small></small></h4>
					<form action="{{route('stores')}}" method="post" id="commentform" />
					@csrf
						<p class="comment-form-comment" style="width: 94.5%">
							<textarea name="content"></textarea>
							<input type="hidden" name="article_id" value="{{$article['id']}}">
						</p>

						<p class="form-submit">
							<input name="submit" type="submit" id="submit" value="提交留言" />
						</p>
					</form>
				</div>
                @endauth
				<!-- ENDS Respond -->
						
		    </div>
			<!-- ENDS posts list -->


			<!-- sidebar -->
			<aside id="sidebar">

				<ul>

					<li class="block">
						<h4 class="heading">精彩早知道</h4>

						<div class="ads cf">
							@article(['iscommend'=>1,'limit'=>4])
							<a href="{{route('single',$a['id'])}}"><img src="{{$a['thumb']}}" alt="Thumbnail" width="120px" height="120px"/></a>
							@endarticle
						</div>
					</li>

					<li class="block">
						<h4 class="heading">Text Widget</h4>
						Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi.
					</li>

					<li class="block">
						<h4 class="heading">推荐文章</h4>
						<ul>
							@article
							<li class="cat-item"><a href="{{route('single',$a['id'])}}" title="title">{{$a['title']}}<span class="post-counter"> ({{$a['author']}})</span></a></li>
							@endarticle
						</ul>
					</li>
				</ul>

			</aside>
			<!-- ENDS sidebar -->
			
			
		</div>
		<!-- ENDS MAIN -->
@endsection